<template>
  <i
    class="iconfont my-icon"
    :class="'icon-' + type + (disabled ? ' color-disabled' : '')"
    :style="{ color: color || '' }"
    @click="handlerClick"
  ></i>
</template>

<script>
export default {
  props: ["type", "disabled", "color"],
  methods: {
    handlerClick(evt) {
      if (!this.disabled) {
        this.$emit("click", evt);
      }
    },
  },
};
</script>

<style lang="less">
@import "../../assets/style/iconfont.css";
</style>
